package chap04.r21421.d1106.demo;



public class Test {
    public static void main(String[] args) {
    Square square=new Square();
        System.out.println(square.getArea(10));
        System.out.println(square.getLength(10));
    }

}

interface  Shape{
    //获得面积
public abstract double getArea(double x);
    //获得周长

double getLength(double y);
}
interface aa extends Shape{

}
class Father{

}
class Son extends Father implements Shape,aa{
    @Override
    public double getArea(double x){
        return 0;
    }
    @Override
    public  double getLength(double y){
        return 0;
    }
}
class Square implements Shape{
    //注解
    @Override
    public double getArea(double x){
        return x*x;
    }
    @Override
    public  double getLength(double y){
        return 4*y;
    }

}
class Circle implements Shape {
    @Override
    public  double getArea(double x){
        return Math.PI*x*x;
    }
    @Override
    public  double getLength(double y){
        return 2*Math.PI*y;
    }

}
